<template>
  <div>
    <lt-echarts :options="option" width="100%" hight="300px" />
  </div>
</template>

<script lang="ts">
import { defineComponent, computed } from 'vue'
import ltEcharts from '../../baseEcharts/ltEchart.vue'
export default defineComponent({
  components: {
    ltEcharts
  },
  props: {
    sale: {
      type: Array
    },
    values: {
      type: Array
    }
  },
  setup(props) {
    const option = computed(() => {
      return {
        tooltip: {
          trigger: 'axis',
          axisPointer: {
            // 坐标轴指示器，坐标轴触发有效
            type: 'line' // 默认为直线，可选为：'line' | 'shadow'
          }
        },
        xAxis: {
          type: 'category',
          boundaryGap: false,
          data: props.values
        },
        yAxis: {
          type: 'value'
        },
        series: [
          {
            data: props.sale,
            type: 'line'
            //areaStyle: {}
          }
        ]
      }
    })
    return {
      option
    }
  }
})
</script>

<style scoped></style>
